<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <meta name="referrer" content="no-referrer-when-downgrade">
    

    <title>Flutter打开外部链接 | 早起的年轻人</title>
    <meta property="og:title" content="Flutter打开外部链接 - 早起的年轻人">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content='2021-09-20T09:51:15&#43;08:00'>
        
        
    <meta property="article:modified_time" content='2021-09-20T09:51:15&#43;08:00'>
        
    <meta name="Keywords" content="Flutter，golang,go语言,go语言笔记,飞雪无情,java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="Flutter打开外部链接">
        
    <meta name="author" content="luckly">
    <meta property="og:url" content="https://luckly.work/post/flutter_package/flutter%E6%89%93%E5%BC%80%E5%A4%96%E9%83%A8%E9%93%BE%E6%8E%A5/">
    <link rel="shortcut icon" href='/favicon.ico'  type="image/x-icon">

    <link rel="stylesheet" href='/css/normalize.css'>
    <link rel="stylesheet" href='/css/style.css'>
    <script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    
    
    
        <link href="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" rel="stylesheet">
    
    
    
    
        <link rel="stylesheet" href='/css/douban.css'>
    
        <link rel="stylesheet" href='/css/other.css'>
    
</head>

<link rel="stylesheet"
      href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<body>
    <header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="https://luckly.work/">
                        早起的年轻人
                    </a>
                
                <p class="description">专注于Flutter、Android、Java、Go语言(golang)、移动互联网、项目管理、软件架构</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="current" href="https://luckly.work/">首页</a>
                    
                    <a  href="https://luckly.work/categories/" title="分类">分类</a>
                    
                    <a  href="https://luckly.work/tags/" title="标签">标签</a>
                    
                    <a  href="https://luckly.work/archives/" title="归档">归档</a>
                    
                    <a  href="https://luckly.work/about/" title="关于我">关于我</a>
                    
                    <a  href="https://github.com/ITmxs/" title="github">github</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>

    <div id="body">
        <div class="container">
            <div class="col-group">

                <div class="col-8" id="main">
                    
<div class="res-cons">
    <style type="text/css">
    .post-toc {
        position: fixed;
        width: 200px;
        margin-left: -210px;
        padding: 5px 10px;
        font-family: Athelas, STHeiti, Microsoft Yahei, serif;
        font-size: 12px;
        border: 1px solid rgba(0, 0, 0, .07);
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.98);
        background-clip: padding-box;
        -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        word-wrap: break-word;
        white-space: nowrap;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        z-index: 999;
        cursor: pointer;
        max-height: 70%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .post-toc .post-toc-title {
        width: 100%;
        margin: 0 auto;
        font-size: 20px;
        font-weight: 400;
        text-transform: uppercase;
        text-align: center;
    }

    .post-toc .post-toc-content {
        font-size: 15px;
    }

    .post-toc .post-toc-content>nav>ul {
        margin: 10px 0;
    }

    .post-toc .post-toc-content ul {
        padding-left: 20px;
        list-style: square;
        margin: 0.5em;
        line-height: 1.8em;
    }

    .post-toc .post-toc-content ul ul {
        padding-left: 15px;
        display: none;
    }

    @media print,
    screen and (max-width:1057px) {
        .post-toc {
            display: none;
        }
    }
</style>
<div class="post-toc" style="position: absolute; top: 188px;">
    <h2 class="post-toc-title">文章目录</h2>
    <div class="post-toc-content">
        <nav id="TableOfContents">
  <ul>
    <li><a href="#对于android">对于android</a></li>
    <li><a href="#对于-ios">对于 iOS</a></li>
    <li><a href="#用法">用法</a>
      <ul>
        <li><a href="#初始链接字符串">初始链接（字符串）</a></li>
        <li><a href="#初始链接-uri">初始链接 (Uri)</a></li>
        <li><a href="#在更改事件字符串">在更改事件（字符串）</a></li>
        <li><a href="#更改事件-uri">更改事件 (Uri)</a></li>
        <li><a href="#有关从链接开始的应用程序的更多信息">有关从链接开始的应用程序的更多信息</a></li>
        <li><a href="#调用链接的工具">调用链接的工具</a></li>
        <li><a href="#安卓">安卓</a></li>
        <li><a href="#ios">IOS</a></li>
        <li><a href="#应用链接或通用链接">应用链接或通用链接</a></li>
      </ul>
    </li>
    <li><a href="#示例">示例</a></li>
  </ul>
</nav>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var postToc = $(".post-toc");
        if (postToc.length) {
            var leftPos = $("#main").offset().left;
            if(leftPos<220){
                postToc.css({"width":leftPos-10,"margin-left":(0-leftPos)})
            }

            var t = postToc.offset().top - 20,
                a = {
                    start: {
                        position: "absolute",
                        top: t
                    },
                    process: {
                        position: "fixed",
                        top: 20
                    },
                };
            $(window).scroll(function () {
                var e = $(window).scrollTop();
                e < t ? postToc.css(a.start) : postToc.css(a.process)
            })
        }
    })
</script>
    <article class="post">
        <header>
            <h1 class="post-title">Flutter打开外部链接</h1>
        </header>
        <date class="post-meta meta-date">
            2021年9月20日
        </date>
        
        <div class="post-meta">
            <span>|</span>
            
            <span class="meta-category"><a href='/categories/flutter'>flutter</a></span>
            
        </div>
        
        
        <div class="post-meta">
            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span>
                    阅读</span></span>
        </div>
        
        
        <div class="post-content">
            <blockquote>
<p>一个 Flutter 插件项目，用于帮助应用程序/深层链接（Android）和通用链接和自定义 URL 方案（iOS）。</p>
<p>这些链接只是类似网络浏览器的链接，可以激活您的应用程序，并且可能包含可用于加载应用程序的特定部分或从网站（或其他应用程序）继续某些用户活动的信息。</p>
<p>应用程序链接和通用链接是常规的 https 链接，因此如果应用程序未安装（或设置正确），它们将加载到浏览器中，允许您显示网页以供进一步操作，例如。安装应用程序。</p>
<p>确保您仔细阅读安装和使用指南，特别是对于应用程序/通用链接（https 方案）。</p>
</blockquote>
<p>安装</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f92672">dependencies</span>:
  <span style="color:#f92672">uni_links</span>:
</code></pre></div><h2 id="对于android">对于android</h2>
<p>Uni Links 支持两种类型的 Android 链接：“应用链接”和“深层链接”。</p>
<ul>
<li>应用程序链接仅适用于<code>https</code>方案并需要指定的主机，以及托管文件 - <code>assetlinks.json</code>. 检查下面的指南链接。</li>
<li>Deep Links 可以有任何自定义方案，不需要主机，也不需要托管文件。缺点是任何应用程序都可以声明方案 + 主机组合，因此请确保您的方案尽可能独特，例如。<code>HST0000001://host.com</code>.</li>
</ul>
<p>您需要在 中至少声明两个意图过滤器之一<code>android/app/src/main/AndroidManifest.xml</code>：</p>
<p>You need to declare at least one of the two intent filters in <code>android/app/src/main/AndroidManifest.xml</code>:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#f92672">&lt;</span>manifest ...<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;!--</span> ... other tags <span style="color:#f92672">--&gt;</span>
  <span style="color:#f92672">&lt;</span>application ...<span style="color:#f92672">&gt;</span>
    <span style="color:#f92672">&lt;</span>activity ...<span style="color:#f92672">&gt;</span>
      <span style="color:#f92672">&lt;!--</span> ... other tags <span style="color:#f92672">--&gt;</span>

      <span style="color:#f92672">&lt;!--</span> Deep Links <span style="color:#f92672">--&gt;</span>
      <span style="color:#f92672">&lt;</span>intent<span style="color:#f92672">-</span>filter<span style="color:#f92672">&gt;</span>
        <span style="color:#f92672">&lt;</span>action android:name<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;android.intent.action.VIEW&#34;</span> <span style="color:#f92672">/&gt;</span>
        <span style="color:#f92672">&lt;</span>category android:name<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;android.intent.category.DEFAULT&#34;</span> <span style="color:#f92672">/&gt;</span>
        <span style="color:#f92672">&lt;</span>category android:name<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;android.intent.category.BROWSABLE&#34;</span> <span style="color:#f92672">/&gt;</span>
        <span style="color:#f92672">&lt;!--</span> Accepts URIs that begin <span style="color:#66d9ef">with</span> YOUR_SCHEME:<span style="color:#75715e">//YOUR_HOST --&gt;
</span><span style="color:#75715e"></span>        <span style="color:#f92672">&lt;</span>data
          android:scheme<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;[YOUR_SCHEME]&#34;</span>
          android:host<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;[YOUR_HOST]&#34;</span> <span style="color:#f92672">/&gt;</span>
      <span style="color:#f92672">&lt;/</span>intent<span style="color:#f92672">-</span>filter<span style="color:#f92672">&gt;</span>

      <span style="color:#f92672">&lt;!--</span> App Links <span style="color:#f92672">--&gt;</span>
      <span style="color:#f92672">&lt;</span>intent<span style="color:#f92672">-</span>filter android:autoVerify<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;true&#34;</span><span style="color:#f92672">&gt;</span>
        <span style="color:#f92672">&lt;</span>action android:name<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;android.intent.action.VIEW&#34;</span> <span style="color:#f92672">/&gt;</span>
        <span style="color:#f92672">&lt;</span>category android:name<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;android.intent.category.DEFAULT&#34;</span> <span style="color:#f92672">/&gt;</span>
        <span style="color:#f92672">&lt;</span>category android:name<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;android.intent.category.BROWSABLE&#34;</span> <span style="color:#f92672">/&gt;</span>
        <span style="color:#f92672">&lt;!--</span> Accepts URIs that begin <span style="color:#66d9ef">with</span> https:<span style="color:#75715e">//YOUR_HOST --&gt;
</span><span style="color:#75715e"></span>        <span style="color:#f92672">&lt;</span>data
          android:scheme<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https&#34;</span>
          android:host<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;[YOUR_HOST]&#34;</span> <span style="color:#f92672">/&gt;</span>
      <span style="color:#f92672">&lt;/</span>intent<span style="color:#f92672">-</span>filter<span style="color:#f92672">&gt;</span>
    <span style="color:#f92672">&lt;/</span>activity<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;/</span>application<span style="color:#f92672">&gt;</span>
<span style="color:#f92672">&lt;/</span>manifest<span style="color:#f92672">&gt;</span>
</code></pre></div><p>The <code>android:host</code> attribute is optional for Deep Links.</p>
<p>To further the specificity you can add an <code>android:pathPrefix</code> attribute:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#f92672">&lt;!--</span> Accepts URIs that begin <span style="color:#66d9ef">with</span> YOUR_SCHEME:<span style="color:#75715e">//YOUR_HOST/NAME/NAME... --&gt;
</span><span style="color:#75715e"></span><span style="color:#f92672">&lt;!--</span> Accepts URIs that begin <span style="color:#66d9ef">with</span>       https:<span style="color:#75715e">//YOUR_HOST/NAME/NAME... --&gt;
</span><span style="color:#75715e"></span><span style="color:#f92672">&lt;!--</span> note that the leading <span style="color:#e6db74">&#34;/&#34;</span> <span style="color:#66d9ef">is</span> required <span style="color:#66d9ef">for</span> pathPrefix <span style="color:#f92672">--&gt;</span>
<span style="color:#f92672">&lt;</span>data
  android:scheme<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;[YOUR_SCHEME_OR_HTTPS]&#34;</span>
  android:host<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;[YOUR_HOST]&#34;</span>
  android:pathPrefix<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/[NAME][/NAME...]&#34;</span> <span style="color:#f92672">/&gt;</span>
</code></pre></div><h2 id="对于-ios">对于 iOS</h2>
<p>iOS 中有两种链接：“通用链接”和“自定义 URL 方案”。</p>
<ul>
<li>通用链接仅适用于<code>https</code>方案并需要指定的主机、权利和托管文件 - <code>apple-app-site-association</code>. 检查下面的指南链接。</li>
<li>自定义 URL 方案可以具有&hellip;任何自定义方案，并且没有主机特性、权利或托管文件。缺点是任何应用程序都可以声明任何方案，因此请确保您的方案尽可能独特，例如。<code>hst0000001</code>或<code>myIncrediblyAwesomeScheme</code>。</li>
</ul>
<p>您需要至少声明两者之一。</p>
<p>——</p>
<p>对于**通用链接，**您需要添加或创建 <code>com.apple.developer.associated-domains</code>权利 - 通过 Xcode（见下文）或通过编辑（或创建并添加到 Xcode）<code>ios/Runner/Runner.entitlements</code> 文件。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#f92672">&lt;?</span>xml version<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;1.0&#34;</span> encoding<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;UTF-8&#34;</span><span style="color:#f92672">?&gt;</span>
<span style="color:#f92672">&lt;!</span>DOCTYPE plist PUBLIC <span style="color:#e6db74">&#34;-//Apple//DTD PLIST 1.0//EN&#34;</span> <span style="color:#e6db74">&#34;http://www.apple.com/DTDs/PropertyList-1.0.dtd&#34;</span><span style="color:#f92672">&gt;</span>
<span style="color:#f92672">&lt;</span>plist version<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;1.0&#34;</span><span style="color:#f92672">&gt;</span>
<span style="color:#f92672">&lt;</span>dict<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;!--</span> ... other keys <span style="color:#f92672">--&gt;</span>
  <span style="color:#f92672">&lt;</span>key<span style="color:#f92672">&gt;</span>com.apple.developer.associated<span style="color:#f92672">-</span>domains<span style="color:#f92672">&lt;/</span>key<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;</span>array<span style="color:#f92672">&gt;</span>
    <span style="color:#f92672">&lt;</span>string<span style="color:#f92672">&gt;</span>applinks:[YOUR_HOST]<span style="color:#f92672">&lt;/</span>string<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;/</span>array<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;!--</span> ... other keys <span style="color:#f92672">--&gt;</span>
<span style="color:#f92672">&lt;/</span>dict<span style="color:#f92672">&gt;</span>
<span style="color:#f92672">&lt;/</span>plist<span style="color:#f92672">&gt;</span>
</code></pre></div><p>对于**自定义 URL 方案，**您需要在<code>ios/Runner/Info.plist</code>（或通过 Xcode 的目标信息编辑器，在 URL 类型下）声明方案 ：</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#f92672">&lt;?</span>xml ...<span style="color:#f92672">&gt;</span>
<span style="color:#f92672">&lt;!--</span> ... other tags <span style="color:#f92672">--&gt;</span>
<span style="color:#f92672">&lt;</span>plist<span style="color:#f92672">&gt;</span>
<span style="color:#f92672">&lt;</span>dict<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;!--</span> ... other tags <span style="color:#f92672">--&gt;</span>
  <span style="color:#f92672">&lt;</span>key<span style="color:#f92672">&gt;</span>CFBundleURLTypes<span style="color:#f92672">&lt;/</span>key<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;</span>array<span style="color:#f92672">&gt;</span>
    <span style="color:#f92672">&lt;</span>dict<span style="color:#f92672">&gt;</span>
      <span style="color:#f92672">&lt;</span>key<span style="color:#f92672">&gt;</span>CFBundleTypeRole<span style="color:#f92672">&lt;/</span>key<span style="color:#f92672">&gt;</span>
      <span style="color:#f92672">&lt;</span>string<span style="color:#f92672">&gt;</span>Editor<span style="color:#f92672">&lt;/</span>string<span style="color:#f92672">&gt;</span>
      <span style="color:#f92672">&lt;</span>key<span style="color:#f92672">&gt;</span>CFBundleURLName<span style="color:#f92672">&lt;/</span>key<span style="color:#f92672">&gt;</span>
      <span style="color:#f92672">&lt;</span>string<span style="color:#f92672">&gt;</span>[ANY_URL_NAME]<span style="color:#f92672">&lt;/</span>string<span style="color:#f92672">&gt;</span>
      <span style="color:#f92672">&lt;</span>key<span style="color:#f92672">&gt;</span>CFBundleURLSchemes<span style="color:#f92672">&lt;/</span>key<span style="color:#f92672">&gt;</span>
      <span style="color:#f92672">&lt;</span>array<span style="color:#f92672">&gt;</span>
        <span style="color:#f92672">&lt;</span>string<span style="color:#f92672">&gt;</span>[YOUR_SCHEME]<span style="color:#f92672">&lt;/</span>string<span style="color:#f92672">&gt;</span>
      <span style="color:#f92672">&lt;/</span>array<span style="color:#f92672">&gt;</span>
    <span style="color:#f92672">&lt;/</span>dict<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;/</span>array<span style="color:#f92672">&gt;</span>
  <span style="color:#f92672">&lt;!--</span> ... other tags <span style="color:#f92672">--&gt;</span>
<span style="color:#f92672">&lt;/</span>dict<span style="color:#f92672">&gt;</span>
<span style="color:#f92672">&lt;/</span>plist<span style="color:#f92672">&gt;</span>
</code></pre></div><h2 id="用法">用法</h2>
<p>您的应用程序将通过两种方式接收链接 - 从冷启动和从后台获取。</p>
<p><strong>注意</strong>：<code>getInitialLink</code>/<code>getInitialUri</code>应该 在您的应用程序的生命周期中<em>仅</em>处理<em>一次</em>，因为它不会在您的应用程序的整个生命周期中发生变化。</p>
<h3 id="初始链接字符串">初始链接（字符串）</h3>
<p>返回应用程序启动的链接（如果有）。</p>
<p>您应该在应用程序生命周期的早期处理这个问题，并且只处理一次。您可以随意多次读取该值，但只能处理一次。</p>
<pre><code>import 'dart:async';
import 'dart:io';

import 'package:uni_links/uni_links.dart';
import 'package:flutter/services.dart' show PlatformException;

// ...

  Future&lt;void&gt; initUniLinks() async {
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      final initialLink = await getInitialLink();
      // Parse the link and warn the user, if it is not correct,
      // but keep in mind it could be `null`.
    } on PlatformException {
      // Handle exception by warning the user their action did not succeed
      // return?
    }
  }

// ...
</code></pre><h3 id="初始链接-uri">初始链接 (Uri)</h3>
<p>与 相同<code>getInitialLink</code>，但转换为<code>Uri</code>。</p>
<p>注意：您应该在应用程序生命周期的早期处理这个问题，并且只<em>处理</em>一次。</p>
<pre><code> // Uri parsing may fail, so we use a try/catch FormatException.
    try {
      final initialUri = await getInitialUri();
      // Use the uri and warn the user, if it is not correct,
      // but keep in mind it could be `null`.
    } on FormatException {
      // Handle exception by warning the user their action did not succeed
      // return?
    }
    // ... other exception handling like PlatformException
</code></pre><p>可以通过使用 来实现相同的目的<code>Uri.parse(initialLink)</code>，这就是这种便捷方法的作用。</p>
<h3 id="在更改事件字符串">在更改事件（字符串）</h3>
<p>通常你会检查<code>getInitialLink</code>并监听变化。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;dart:async&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;dart:io&#39;</span>;

<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:uni_links/uni_links.dart&#39;</span>;

<span style="color:#75715e">// ...
</span><span style="color:#75715e"></span>
  StreamSubscription _sub;

  Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">void</span><span style="color:#f92672">&gt;</span> initUniLinks() <span style="color:#66d9ef">async</span> {
    <span style="color:#75715e">// ... check initialLink
</span><span style="color:#75715e"></span>
    <span style="color:#75715e">// Attach a listener to the stream
</span><span style="color:#75715e"></span>    _sub <span style="color:#f92672">=</span> linkStream.listen((<span style="color:#66d9ef">String</span><span style="color:#f92672">?</span> link) {
      <span style="color:#75715e">// Parse the link and warn the user, if it is not correct
</span><span style="color:#75715e"></span>    }, onError: (err) {
      <span style="color:#75715e">// Handle exception by warning the user their action did not succeed
</span><span style="color:#75715e"></span>    });

    <span style="color:#75715e">// NOTE: Don&#39;t forget to call _sub.cancel() in dispose()
</span><span style="color:#75715e"></span>  }

<span style="color:#75715e">// ...
</span></code></pre></div><h3 id="更改事件-uri">更改事件 (Uri)</h3>
<p>与 相同<code>linkStream</code>，但转换为发射<code>Uri</code>对象。</p>
<p>通常你会检查<code>getInitialUri</code>并监听变化。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;dart:async&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;dart:io&#39;</span>;

<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:uni_links/uni_links.dart&#39;</span>;

<span style="color:#75715e">// ...
</span><span style="color:#75715e"></span>
  StreamSubscription _sub;

  Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">void</span><span style="color:#f92672">&gt;</span> initUniLinks() <span style="color:#66d9ef">async</span> {
    <span style="color:#75715e">// ... check initialUri
</span><span style="color:#75715e"></span>
    <span style="color:#75715e">// Attach a listener to the stream
</span><span style="color:#75715e"></span>    _sub <span style="color:#f92672">=</span> uriLinkStream.listen((Uri<span style="color:#f92672">?</span> uri) {
      <span style="color:#75715e">// Use the uri and warn the user, if it is not correct
</span><span style="color:#75715e"></span>    }, onError: (err) {
      <span style="color:#75715e">// Handle exception by warning the user their action did not succeed
</span><span style="color:#75715e"></span>    });

    <span style="color:#75715e">// NOTE: Don&#39;t forget to call _sub.cancel() in dispose()
</span><span style="color:#75715e"></span>  }

<span style="color:#75715e">// ...
</span></code></pre></div><h3 id="有关从链接开始的应用程序的更多信息">有关从链接开始的应用程序的更多信息</h3>
<p>如果应用程序被终止（或者不是在后台运行）并且操作系统必须重新启动它 - 这是一个冷启动。在这种情况下，<code>getInitialLink</code>将拥有启动您的应用程序的链接，并且 Stream 不会生成链接（在那个时间点）。</p>
<p>或者-如果应用程序在后台运行，操作系统必须把它带到前台流将成为一个生产环节，而 <code>getInitialLink</code>将两种<code>null</code>或初始链路，与该应用程序已启动。</p>
<p>由于这两种情况 - 您应该始终添加对初始链接（或 URI）的检查，并订阅链接流（或 URI）。</p>
<h3 id="调用链接的工具">调用链接的工具</h3>
<p>如果你注册一个模式，比如说<code>unilink</code>，你可以使用这些 cli 工具：</p>
<h3 id="安卓">安卓</h3>
<p>您可以在<a href="https://developer.android.com/studio/write/app-link-indexing#testindent">Android Studio 中</a>执行以下任务。</p>
<p>假设您已经安装了 Android Studio（使用 SDK 平台工具）：</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart">adb shell <span style="color:#e6db74">&#39;am start -W -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d &#34;unilinks://host/path/subpath&#34;&#39;</span>
adb shell <span style="color:#e6db74">&#39;am start -W -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d &#34;unilinks://example.com/path/portion/?uid=123&amp;token=abc&#34;&#39;</span>
adb shell <span style="color:#e6db74">&#39;am start -W -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d &#34;unilinks://example.com/?arr%5b%5d=123&amp;arr%5b%5d=abc&amp;addr=1%20Nowhere%20Rd&amp;addr=Rand%20City%F0%9F%98%82&#34;&#39;</span>
adb shell <span style="color:#e6db74">&#39;am start -W -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d &#34;unilinks://@@malformed.invalid.url/path?&#34;&#39;</span>

</code></pre></div><p>如果您<a href="https://developer.android.com/studio/command-line/adb"><code>adb</code></a> 的路径中没有，但有<code>$ANDROID_HOME</code>env 变量，则使用 <code>&quot;$ANDROID_HOME&quot;/platform-tools/adb ...</code>.</p>
<p>注意：或者，您可以简单地输入 an<code>adb shell</code>并运行其中的 <a href="https://developer.android.com/studio/command-line/adb#am"><code>am</code></a>命令。</p>
<p>注意：我使用单引号，因为<code>shell</code>命令后面的内容是将在模拟器（或设备）中运行的内容和 shell 元字符，例如问号 ( <code>?</code>) 和与号 ( <code>&amp;</code>)，通常与您自己的 shell 具有不同的含义。</p>
<p><code>adb shell</code> 与唯一可用的设备（或模拟器）通信，因此如果您有多个设备，则必须通过以下方式指定要在其中运行 shell 的设备：</p>
<ul>
<li>该<em>只</em>USB连接的设备-<code>adb -d shell '...'</code></li>
<li>该<em>唯一的</em>模拟设备-<code>adb -e shell '...'</code></li>
</ul>
<p>您可以<code>adb devices</code>用来列出当前可用的设备（同样 <code>flutter devices</code>做同样的工作）。</p>
<h3 id="ios">IOS</h3>
<p>假设您已经安装了 Xcode：</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#f92672">/</span>usr<span style="color:#f92672">/</span>bin<span style="color:#f92672">/</span>xcrun simctl openurl booted <span style="color:#e6db74">&#34;unilinks://host/path/subpath&#34;</span>
<span style="color:#f92672">/</span>usr<span style="color:#f92672">/</span>bin<span style="color:#f92672">/</span>xcrun simctl openurl booted <span style="color:#e6db74">&#34;unilinks://example.com/path/portion/?uid=123&amp;token=abc&#34;</span>
<span style="color:#f92672">/</span>usr<span style="color:#f92672">/</span>bin<span style="color:#f92672">/</span>xcrun simctl openurl booted <span style="color:#e6db74">&#34;unilinks://example.com/?arr%5b%5d=123&amp;arr%5b%5d=abc&amp;addr=1%20Nowhere%20Rd&amp;addr=Rand%20City%F0%9F%98%82&#34;</span>
<span style="color:#f92672">/</span>usr<span style="color:#f92672">/</span>bin<span style="color:#f92672">/</span>xcrun simctl openurl booted <span style="color:#e6db74">&#34;unilinks://@@malformed.invalid.url/path?&#34;</span>

</code></pre></div><p>如果您的路径中有<code>xcrun</code>(或<code>simctl</code>)，则可以直接调用它。</p>
<p>该标志<code>booted</code>假定一个<code>open -a Simulator</code>带有启动设备的开放模拟器（您可以通过 启动它 ）。您可以通过指定其 UUID（通过<code>xcrun simctl list</code>或找到<code>flutter devices</code>）来定位特定设备，替换<code>booted</code>标志。</p>
<h3 id="应用链接或通用链接">应用链接或通用链接</h3>
<p>这些类型的链接<code>https</code>用于模式，因此您可以通过替换<code>unilinks</code>为<code>https</code>.</p>
<h2 id="示例">示例</h2>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;dart:async&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;dart:io&#39;</span>;

<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter/foundation.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter/material.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter/services.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:uni_links/uni_links.dart&#39;</span>;

<span style="color:#66d9ef">bool</span> _initialUriIsHandled <span style="color:#f92672">=</span> <span style="color:#66d9ef">false</span>;

<span style="color:#66d9ef">void</span> main() <span style="color:#f92672">=&gt;</span> runApp(MaterialApp(home: MyApp()));

<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">MyApp</span> <span style="color:#66d9ef">extends</span> StatefulWidget {
  <span style="color:#960050;background-color:#1e0010">@</span>override
  _MyAppState createState() <span style="color:#f92672">=&gt;</span> _MyAppState();
}

<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">_MyAppState</span> <span style="color:#66d9ef">extends</span> State<span style="color:#f92672">&lt;</span>MyApp<span style="color:#f92672">&gt;</span> <span style="color:#66d9ef">with</span> SingleTickerProviderStateMixin {
  Uri<span style="color:#f92672">?</span> _initialUri;
  Uri<span style="color:#f92672">?</span> _latestUri;
  <span style="color:#66d9ef">Object</span><span style="color:#f92672">?</span> _err;

  StreamSubscription<span style="color:#f92672">?</span> _sub;

  <span style="color:#66d9ef">final</span> _scaffoldKey <span style="color:#f92672">=</span> GlobalKey();
  <span style="color:#66d9ef">final</span> _cmds <span style="color:#f92672">=</span> getCmds();
  <span style="color:#66d9ef">final</span> _cmdStyle <span style="color:#f92672">=</span> <span style="color:#66d9ef">const</span> TextStyle(
      fontFamily: <span style="color:#e6db74">&#39;Courier&#39;</span>, fontSize: <span style="color:#ae81ff">12.0</span>, fontWeight: FontWeight.w700);

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">void</span> initState() {
    <span style="color:#66d9ef">super</span>.initState();
    _handleIncomingLinks();
    _handleInitialUri();
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">void</span> dispose() {
    _sub<span style="color:#f92672">?</span>.cancel();
    <span style="color:#66d9ef">super</span>.dispose();
  }

  <span style="color:#75715e">/// Handle incoming links - the ones that the app will recieve from the OS
</span><span style="color:#75715e"></span>  <span style="color:#75715e">/// while already started.
</span><span style="color:#75715e"></span>  <span style="color:#66d9ef">void</span> _handleIncomingLinks() {
    <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>kIsWeb) {
      <span style="color:#75715e">// It will handle app links while the app is already started - be it in
</span><span style="color:#75715e"></span>      <span style="color:#75715e">// the foreground or in the background.
</span><span style="color:#75715e"></span>      _sub <span style="color:#f92672">=</span> uriLinkStream.listen((Uri<span style="color:#f92672">?</span> uri) {
        <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>mounted) <span style="color:#66d9ef">return</span>;
        print(<span style="color:#e6db74">&#39;got uri: </span><span style="color:#e6db74">$</span>uri<span style="color:#e6db74">&#39;</span>);
        setState(() {
          _latestUri <span style="color:#f92672">=</span> uri;
          _err <span style="color:#f92672">=</span> <span style="color:#66d9ef">null</span>;
        });
      }, onError: (<span style="color:#66d9ef">Object</span> err) {
        <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>mounted) <span style="color:#66d9ef">return</span>;
        print(<span style="color:#e6db74">&#39;got err: </span><span style="color:#e6db74">$</span>err<span style="color:#e6db74">&#39;</span>);
        setState(() {
          _latestUri <span style="color:#f92672">=</span> <span style="color:#66d9ef">null</span>;
          <span style="color:#66d9ef">if</span> (err <span style="color:#66d9ef">is</span> FormatException) {
            _err <span style="color:#f92672">=</span> err;
          } <span style="color:#66d9ef">else</span> {
            _err <span style="color:#f92672">=</span> <span style="color:#66d9ef">null</span>;
          }
        });
      });
    }
  }

  <span style="color:#75715e">/// Handle the initial Uri - the one the app was started with
</span><span style="color:#75715e"></span>  <span style="color:#75715e">///
</span><span style="color:#75715e"></span>  <span style="color:#75715e">/// **ATTENTION**: `getInitialLink`/`getInitialUri` should be handled
</span><span style="color:#75715e"></span>  <span style="color:#75715e">/// ONLY ONCE in your app&#39;s lifetime, since it is not meant to change
</span><span style="color:#75715e"></span>  <span style="color:#75715e">/// throughout your app&#39;s life.
</span><span style="color:#75715e"></span>  <span style="color:#75715e">///
</span><span style="color:#75715e"></span>  <span style="color:#75715e">/// We handle all exceptions, since it is called from initState.
</span><span style="color:#75715e"></span>  Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">void</span><span style="color:#f92672">&gt;</span> _handleInitialUri() <span style="color:#66d9ef">async</span> {
    <span style="color:#75715e">// In this example app this is an almost useless guard, but it is here to
</span><span style="color:#75715e"></span>    <span style="color:#75715e">// show we are not going to call getInitialUri multiple times, even if this
</span><span style="color:#75715e"></span>    <span style="color:#75715e">// was a weidget that will be disposed of (ex. a navigation route change).
</span><span style="color:#75715e"></span>    <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>_initialUriIsHandled) {
      _initialUriIsHandled <span style="color:#f92672">=</span> <span style="color:#66d9ef">true</span>;
      _showSnackBar(<span style="color:#e6db74">&#39;_handleInitialUri called&#39;</span>);
      <span style="color:#66d9ef">try</span> {
        <span style="color:#66d9ef">final</span> uri <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> getInitialUri();
        <span style="color:#66d9ef">if</span> (uri <span style="color:#f92672">==</span> <span style="color:#66d9ef">null</span>) {
          print(<span style="color:#e6db74">&#39;no initial uri&#39;</span>);
        } <span style="color:#66d9ef">else</span> {
          print(<span style="color:#e6db74">&#39;got initial uri: </span><span style="color:#e6db74">$</span>uri<span style="color:#e6db74">&#39;</span>);
        }
        <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>mounted) <span style="color:#66d9ef">return</span>;
        setState(() <span style="color:#f92672">=&gt;</span> _initialUri <span style="color:#f92672">=</span> uri);
      } on PlatformException {
        <span style="color:#75715e">// Platform messages may fail but we ignore the exception
</span><span style="color:#75715e"></span>        print(<span style="color:#e6db74">&#39;falied to get initial uri&#39;</span>);
      } on FormatException <span style="color:#66d9ef">catch</span> (err) {
        <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>mounted) <span style="color:#66d9ef">return</span>;
        print(<span style="color:#e6db74">&#39;malformed initial uri&#39;</span>);
        setState(() <span style="color:#f92672">=&gt;</span> _err <span style="color:#f92672">=</span> err);
      }
    }
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  Widget build(BuildContext context) {
    <span style="color:#66d9ef">final</span> queryParams <span style="color:#f92672">=</span> _latestUri<span style="color:#f92672">?</span>.queryParametersAll.entries.toList();

    <span style="color:#66d9ef">return</span> Scaffold(
      key: _scaffoldKey,
      appBar: AppBar(
        title: <span style="color:#66d9ef">const</span> Text(<span style="color:#e6db74">&#39;uni_links example app&#39;</span>),
      ),
      body: ListView(
        shrinkWrap: <span style="color:#66d9ef">true</span>,
        padding: <span style="color:#66d9ef">const</span> EdgeInsets.all(<span style="color:#ae81ff">8.0</span>),
        children: [
          <span style="color:#66d9ef">if</span> (_err <span style="color:#f92672">!=</span> <span style="color:#66d9ef">null</span>)
            ListTile(
              title: <span style="color:#66d9ef">const</span> Text(<span style="color:#e6db74">&#39;Error&#39;</span>, style: TextStyle(color: Colors.red)),
              subtitle: Text(<span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>_err<span style="color:#e6db74">&#39;</span>),
            ),
          ListTile(
            title: <span style="color:#66d9ef">const</span> Text(<span style="color:#e6db74">&#39;Initial Uri&#39;</span>),
            subtitle: Text(<span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>_initialUri<span style="color:#e6db74">&#39;</span>),
          ),
          <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>kIsWeb) ...[
            ListTile(
              title: <span style="color:#66d9ef">const</span> Text(<span style="color:#e6db74">&#39;Latest Uri&#39;</span>),
              subtitle: Text(<span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>_latestUri<span style="color:#e6db74">&#39;</span>),
            ),
            ListTile(
              title: <span style="color:#66d9ef">const</span> Text(<span style="color:#e6db74">&#39;Latest Uri (path)&#39;</span>),
              subtitle: Text(<span style="color:#e6db74">&#39;</span><span style="color:#e6db74">${</span>_latestUri<span style="color:#f92672">?</span>.path<span style="color:#e6db74">}</span><span style="color:#e6db74">&#39;</span>),
            ),
            ExpansionTile(
              initiallyExpanded: <span style="color:#66d9ef">true</span>,
              title: <span style="color:#66d9ef">const</span> Text(<span style="color:#e6db74">&#39;Latest Uri (query parameters)&#39;</span>),
              children: queryParams <span style="color:#f92672">==</span> <span style="color:#66d9ef">null</span>
                  <span style="color:#f92672">?</span> <span style="color:#66d9ef">const</span> [ListTile(dense: <span style="color:#66d9ef">true</span>, title: Text(<span style="color:#e6db74">&#39;null&#39;</span>))]
                  <span style="color:#f92672">:</span> [
                      <span style="color:#66d9ef">for</span> (<span style="color:#66d9ef">final</span> item <span style="color:#66d9ef">in</span> queryParams)
                        ListTile(
                          title: Text(item.key),
                          trailing: Text(item.value.join(<span style="color:#e6db74">&#39;, &#39;</span>)),
                        )
                    ],
            ),
          ],
          _cmdsCard(_cmds),
          <span style="color:#66d9ef">const</span> Divider(),
          <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>kIsWeb)
            ListTile(
              leading: <span style="color:#66d9ef">const</span> Icon(Icons.error, color: Colors.red),
              title: <span style="color:#66d9ef">const</span> Text(
                <span style="color:#e6db74">&#39;Force quit this example app&#39;</span>,
                style: TextStyle(color: Colors.red),
              ),
              onTap: () {
                <span style="color:#75715e">// WARNING: DO NOT USE this in production !!!
</span><span style="color:#75715e"></span>                <span style="color:#75715e">//          Your app will (most probably) be rejected !!!
</span><span style="color:#75715e"></span>                <span style="color:#66d9ef">if</span> (Platform.isIOS) {
                  exit(<span style="color:#ae81ff">0</span>);
                } <span style="color:#66d9ef">else</span> {
                  SystemNavigator.pop();
                }
              },
            ),
        ],
      ),
    );
  }

  Widget _cmdsCard(List<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">String</span><span style="color:#f92672">&gt;?</span> commands) {
    Widget platformCmds;

    <span style="color:#66d9ef">if</span> (commands <span style="color:#f92672">==</span> <span style="color:#66d9ef">null</span>) {
      platformCmds <span style="color:#f92672">=</span> <span style="color:#66d9ef">const</span> Center(child: Text(<span style="color:#e6db74">&#39;Unsupported platform&#39;</span>));
    } <span style="color:#66d9ef">else</span> {
      platformCmds <span style="color:#f92672">=</span> Column(
        children: [
          <span style="color:#66d9ef">const</span> [
            <span style="color:#66d9ef">if</span> (kIsWeb)
              Text(<span style="color:#e6db74">&#39;Append this path to the Web app</span><span style="color:#ae81ff">\&#39;</span><span style="color:#e6db74">s URL, replacing `#/`:</span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">&#39;</span>)
            <span style="color:#66d9ef">else</span>
              Text(<span style="color:#e6db74">&#39;To populate above fields open a terminal shell and run:</span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">&#39;</span>),
          ],
          intersperse(
              commands.map<span style="color:#f92672">&lt;</span>Widget<span style="color:#f92672">&gt;</span>((cmd) <span style="color:#f92672">=&gt;</span> InkWell(
                    onTap: () <span style="color:#f92672">=&gt;</span> _printAndCopy(cmd),
                    child: Text(<span style="color:#e6db74">&#39;</span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">$</span>cmd<span style="color:#ae81ff">\n</span><span style="color:#e6db74">&#39;</span>, style: _cmdStyle),
                  )),
              <span style="color:#66d9ef">const</span> Text(<span style="color:#e6db74">&#39;or&#39;</span>)),
          [
            Text(
              <span style="color:#e6db74">&#39;(tap on any of the above commands to print it to&#39;</span>
              <span style="color:#e6db74">&#39; the console/logger and copy to the device clipboard.)&#39;</span>,
              textAlign: TextAlign.center,
              style: Theme.of(context).textTheme.caption,
            ),
          ]
        ].expand((el) <span style="color:#f92672">=&gt;</span> el).toList(),
      );
    }

    <span style="color:#66d9ef">return</span> Card(
      margin: <span style="color:#66d9ef">const</span> EdgeInsets.only(top: <span style="color:#ae81ff">20.0</span>),
      child: Padding(
        padding: <span style="color:#66d9ef">const</span> EdgeInsets.all(<span style="color:#ae81ff">10.0</span>),
        child: platformCmds,
      ),
    );
  }

  Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">void</span><span style="color:#f92672">&gt;</span> _printAndCopy(<span style="color:#66d9ef">String</span> cmd) <span style="color:#66d9ef">async</span> {
    print(cmd);

    <span style="color:#66d9ef">await</span> Clipboard.setData(ClipboardData(text: cmd));
    ScaffoldMessenger.of(context).showSnackBar(
      <span style="color:#66d9ef">const</span> SnackBar(content: Text(<span style="color:#e6db74">&#39;Copied to Clipboard&#39;</span>)),
    );
  }

  <span style="color:#66d9ef">void</span> _showSnackBar(<span style="color:#66d9ef">String</span> msg) {
    WidgetsBinding.instance<span style="color:#f92672">?</span>.addPostFrameCallback((_) {
      <span style="color:#66d9ef">final</span> context <span style="color:#f92672">=</span> _scaffoldKey.currentContext;
      <span style="color:#66d9ef">if</span> (context <span style="color:#f92672">!=</span> <span style="color:#66d9ef">null</span>) {
        ScaffoldMessenger.of(context).showSnackBar(SnackBar(
          content: Text(msg),
        ));
      }
    });
  }
}

List<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">String</span><span style="color:#f92672">&gt;?</span> getCmds() {
  late <span style="color:#66d9ef">final</span> <span style="color:#66d9ef">String</span> cmd;
  <span style="color:#66d9ef">var</span> cmdSuffix <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;&#39;</span>;

  <span style="color:#66d9ef">const</span> plainPath <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;path/subpath&#39;</span>;
  <span style="color:#66d9ef">const</span> args <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;path/portion/?uid=123&amp;token=abc&#39;</span>;
  <span style="color:#66d9ef">const</span> emojiArgs <span style="color:#f92672">=</span>
      <span style="color:#e6db74">&#39;?arr%5b%5d=123&amp;arr%5b%5d=abc&amp;addr=1%20Nowhere%20Rd&amp;addr=Rand%20City%F0%9F%98%82&#39;</span>;

  <span style="color:#66d9ef">if</span> (kIsWeb) {
    <span style="color:#66d9ef">return</span> [
      plainPath,
      args,
      emojiArgs,
      <span style="color:#75715e">// Cannot create malformed url, since the browser will ensure it is valid
</span><span style="color:#75715e"></span>    ];
  }

  <span style="color:#66d9ef">if</span> (Platform.isIOS) {
    cmd <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;/usr/bin/xcrun simctl openurl booted&#39;</span>;
  } <span style="color:#66d9ef">else</span> <span style="color:#66d9ef">if</span> (Platform.isAndroid) {
    cmd <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;</span><span style="color:#ae81ff">\$</span><span style="color:#e6db74">ANDROID_HOME/platform-tools/adb shell </span><span style="color:#ae81ff">\&#39;</span><span style="color:#e6db74">am start&#39;</span>
        <span style="color:#e6db74">&#39; -a android.intent.action.VIEW&#39;</span>
        <span style="color:#e6db74">&#39; -c android.intent.category.BROWSABLE -d&#39;</span>;
    cmdSuffix <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;&#39;&#34;</span>;
  } <span style="color:#66d9ef">else</span> {
    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">null</span>;
  }

  <span style="color:#75715e">// https://orchid-forgery.glitch.me/mobile/redirect/
</span><span style="color:#75715e"></span>  <span style="color:#66d9ef">return</span> [
    <span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>cmd<span style="color:#e6db74"> &#34;unilinks://host/</span><span style="color:#e6db74">$</span>plainPath<span style="color:#e6db74">&#34;</span><span style="color:#e6db74">$</span>cmdSuffix<span style="color:#e6db74">&#39;</span>,
    <span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>cmd<span style="color:#e6db74"> &#34;unilinks://example.com/</span><span style="color:#e6db74">$</span>args<span style="color:#e6db74">&#34;</span><span style="color:#e6db74">$</span>cmdSuffix<span style="color:#e6db74">&#39;</span>,
    <span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>cmd<span style="color:#e6db74"> &#34;unilinks://example.com/</span><span style="color:#e6db74">$</span>emojiArgs<span style="color:#e6db74">&#34;</span><span style="color:#e6db74">$</span>cmdSuffix<span style="color:#e6db74">&#39;</span>,
    <span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>cmd<span style="color:#e6db74"> &#34;unilinks://@@malformed.invalid.url/path?&#34;</span><span style="color:#e6db74">$</span>cmdSuffix<span style="color:#e6db74">&#39;</span>,
  ];
}

List<span style="color:#f92672">&lt;</span>Widget<span style="color:#f92672">&gt;</span> intersperse(Iterable<span style="color:#f92672">&lt;</span>Widget<span style="color:#f92672">&gt;</span> list, Widget item) {
  <span style="color:#66d9ef">final</span> initialValue <span style="color:#f92672">=</span> <span style="color:#f92672">&lt;</span>Widget<span style="color:#f92672">&gt;</span>[];
  <span style="color:#66d9ef">return</span> list.fold(initialValue, (all, el) {
    <span style="color:#66d9ef">if</span> (all.isNotEmpty) all.add(item);
    all.add(el);
    <span style="color:#66d9ef">return</span> all;
  });
}
</code></pre></div><div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#75715e">//
</span><span style="color:#75715e">// Generated file. Do not edit.
</span><span style="color:#75715e">//
</span><span style="color:#75715e"></span>
<span style="color:#75715e">// ignore_for_file: lines_longer_than_80_chars
</span><span style="color:#75715e"></span>
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:uni_links_web/uni_links_web.dart&#39;</span>;

<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter_web_plugins/flutter_web_plugins.dart&#39;</span>;

<span style="color:#75715e">// ignore: public_member_api_docs
</span><span style="color:#75715e"></span><span style="color:#66d9ef">void</span> registerPlugins(Registrar registrar) {
  UniLinksPlugin.registerWith(registrar);
  registrar.registerMessageHandler();
}
</code></pre></div>
        </div>

        
<div class="post-archive">
    <ul class="post-copyright">
        <li><strong>原文作者：</strong><a rel="author" href="https://luckly.work/">luckly</a></li>
        <li style="word-break:break-all"><strong>原文链接：</strong><a href="https://luckly.work/post/flutter_package/flutter%E6%89%93%E5%BC%80%E5%A4%96%E9%83%A8%E9%93%BE%E6%8E%A5/">https://luckly.work/post/flutter_package/flutter%E6%89%93%E5%BC%80%E5%A4%96%E9%83%A8%E9%93%BE%E6%8E%A5/</a></li>
        <li><strong>版权声明：</strong>本作品采用<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/">知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议</a>进行许可，非商业转载请注明出处（作者，原文链接），商业转载请联系作者获得授权。</li>
    </ul>
</div>
<br/>



        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/post/flutter_tips/flutter10%E5%88%86%E9%92%9F%E5%88%B6%E4%BD%9C%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99%E5%B1%95%E7%A4%BA%E9%A1%B5/">Flutter10分钟制作个人资料展示页</a></li>
        
        <li><a href="/post/flutter_tips/%E5%9C%A8flutter%E4%B8%AD%E5%88%9B%E5%BB%BA%E5%8F%8D%E8%BD%AC%E5%8D%A1%E7%89%87%E5%8A%A8%E7%94%BB%E7%9A%842%E7%A7%8D%E6%96%B9%E6%B3%95/">在flutter中创建反转卡片动画的2种方法</a></li>
        
        <li><a href="/post/go_basic/go%E8%AF%BB%E5%8F%96text%E6%96%87%E4%BB%B6%E5%86%85%E5%AE%B9%E5%B9%B6%E6%89%93%E5%8D%B0%E6%AF%8F%E8%A1%8C%E6%95%B0%E6%8D%AE/">Go读取text文件内容，并打印每行数据</a></li>
        
        <li><a href="/post/flutter_basic/%E5%A6%82%E4%BD%95%E6%8F%90%E9%AB%98flutter%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E7%9A%84%E6%80%A7%E8%83%BD/">如何提高flutter应用程序的性能</a></li>
        
        <li><a href="/post/flutter_basic/%E6%8F%90%E7%A4%BAflutter%E6%80%A7%E8%83%BD%E7%9A%84%E4%B8%80%E4%BA%9B%E6%8E%AA%E6%96%BD/">提示flutter性能的一些措施</a></li>
        
    </ul>
</div>


        <div class="post-meta meta-tags">
            
            <ul class="clearfix">
                
                <li><a href='/tags/flutter'>flutter</a></li>
                
            </ul>
            
        </div>
    </article>
    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "https://github.com/ITmxs/repo"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
</div>

                    <footer id="footer">
    <div>
        &copy; 2021 <a href="https://luckly.work/">早起的年轻人 By luckly</a>
        
        | <a rel="nofollow" target="_blank" href="http://beian.miit.gov.cn/">粤ICP备2021号-1</a>
        
    </div>
    <br />
    <div>
        <div class="github-badge">
            <a href="https://juejin.cn/user/3843548384077192" target="_black" rel="nofollow"><span class="badge-subject">Powered by</span><span class="badge-value bg-blue">掘金</span></a>
        </div>
        <div class="github-badge">
            <a href="https://space.bilibili.com/480883651" target="_black"><span class="badge-subject">Design by</span><span class="badge-value bg-brightgreen">早起的年轻人</span></a>
        </div>
        <div class="github-badge">
            <a href="https://cloud.tencent.com/developer/user/6702670" target="_black"><span class="badge-subject">Theme</span><span class="badge-value bg-yellowgreen">云社区</span></a>
        </div>
    </div>
</footer>


    
    <script type="text/javascript">
        window.MathJax = {
            tex2jax: {
                inlineMath: [['$', '$']],
                processEscapes: true
                }
            };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script><script src="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src='/js/totop.js?v=0.0.0' async=""></script>



    <script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




    <script src='/js/douban.js'></script>
    <script src="/js/copy-to-clipboard.js"></script>

                </div>

                <div id="secondary">
    <section class="widget">
        <form id="search" action='https://luckly.work/search/' method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="https://luckly.work/">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="https://luckly.work/post/nginx/nginx%E6%96%87%E4%BB%B6%E5%86%85%E5%AE%B9/" title="Nginx文件内容">Nginx文件内容</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/nginx/nginx%E6%9E%81%E7%AE%80%E6%95%99%E7%A8%8B/" title="Nginx极简教程">Nginx极简教程</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/nginx/%E5%8D%81%E5%88%86%E9%92%9F%E5%85%A5%E9%97%A8nginx/" title="十分钟入门Nginx">十分钟入门Nginx</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/go/Goland%E8%BF%9C%E7%A8%8B%E5%BC%80%E5%8F%91%E9%85%8D%E7%BD%AE/" title="Goland远程开发配置">Goland远程开发配置</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E8%AF%BB%E4%B9%A6/%E5%9F%9F%E5%90%8D%E8%A7%A3%E6%9E%90/" title="域名解析">域名解析</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/git/%E6%8F%90%E4%BA%A4%E8%BF%87%E7%A8%8B%E7%9C%81%E7%95%A5%E6%9F%90%E4%BA%9B%E6%96%87%E4%BB%B6/" title="提交过程省略某些文件">提交过程省略某些文件</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_tips/Flutter_DropdownButton%E7%A4%BA%E4%BE%8B/" title="Flutter_DropdownButton示例">Flutter_DropdownButton示例</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_tips/Flutter_ExpansionPanelList%E5%92%8CExpansionPanelList.radio%E7%A4%BA%E4%BE%8B/" title="Flutter_ExpansionPanelList和ExpansionPanelList">Flutter_ExpansionPanelList和ExpansionPanelList</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_tips/Flutter%E5%BE%AE%E4%BF%A1%E5%88%86%E4%BA%AB%E9%93%BE%E6%8E%A5%E8%B7%B3%E5%9B%9EApp%E6%8C%87%E5%AE%9A%E9%A1%B5%E9%9D%A2/" title="Flutter微信分享链接跳回App指定页面">Flutter微信分享链接跳回App指定页面</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F/%E5%A4%96%E5%8C%85%E5%8F%AF%E8%83%BD%E7%9A%84%E9%97%AE%E9%A2%98/" title="外包可能的问题">外包可能的问题</a>
    </li>
    
</ul>
    </section>

    

    <section class="widget">
        <h3 class="widget-title"><a href='/categories/'>分类</a></h3>
<ul class="widget-list">
    
    <li><a href="https://luckly.work/categories/Flutter/">Flutter (326)</a></li>
    
    <li><a href="https://luckly.work/categories/IT/">IT (2)</a></li>
    
    <li><a href="https://luckly.work/categories/Kotlin/">Kotlin (2)</a></li>
    
    <li><a href="https://luckly.work/categories/Mysql/">Mysql (1)</a></li>
    
    <li><a href="https://luckly.work/categories/nginx/">nginx (1)</a></li>
    
    <li><a href="https://luckly.work/categories/Vue/">Vue (6)</a></li>
    
    <li><a href="https://luckly.work/categories/YouTube%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD/">YouTube视频下载 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/android/">android (6)</a></li>
    
    <li><a href="https://luckly.work/categories/dart/">dart (96)</a></li>
    
    <li><a href="https://luckly.work/categories/Flutter/">Flutter (28)</a></li>
    
    <li><a href="https://luckly.work/categories/gin/">gin (25)</a></li>
    
    <li><a href="https://luckly.work/categories/git/">git (4)</a></li>
    
    <li><a href="https://luckly.work/categories/Go/">Go (102)</a></li>
    
    <li><a href="https://luckly.work/categories/gorm/">gorm (4)</a></li>
    
    <li><a href="https://luckly.work/categories/grpc/">grpc (1)</a></li>
    
    <li><a href="https://luckly.work/categories/html/">html (3)</a></li>
    
    <li><a href="https://luckly.work/categories/ios/">ios (1)</a></li>
    
    <li><a href="https://luckly.work/categories/linux/">linux (1)</a></li>
    
    <li><a href="https://luckly.work/categories/nginx/">nginx (6)</a></li>
    
    <li><a href="https://luckly.work/categories/python/">python (35)</a></li>
    
    <li><a href="https://luckly.work/categories/read/">读书笔记 (6)</a></li>
    
    <li><a href="https://luckly.work/categories/redis/">redis (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99/">个人资料 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B9%A6%E5%8D%95/">书单 (8)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B9%A6%E8%AF%84/">书评 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统管理师 (19)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统项目管理师 (25)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%8E%9F%E5%88%99/">原则 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%8E%9F%E7%94%9F%E9%80%9A%E8%AE%AF/">原生通讯 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%9F%BA%E7%A1%80/">基础 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%A4%8D%E5%88%A9%E6%95%88%E5%BA%94/">复利效应 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%B0%91%E6%9C%89%E4%BA%BA%E8%B5%B0%E7%9A%84%E8%B7%AF/">少有人走的路 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%BF%83%E8%AF%AD/">心语 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E6%8F%92%E4%BB%B6/">插件 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E6%95%99%E5%AD%A6/">教学 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%8E%8B%E9%98%B3%E6%98%8E/">王阳明 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%94%B5%E5%AD%90%E4%B9%A6/">电子书 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%99%BB%E9%99%86%E8%A1%A8%E5%8D%95/">登陆表单 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%A8%BB%E7%9B%9B%E5%92%8C%E5%A4%AB/">稻盛和夫 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%A9%B7%E7%88%B8%E7%88%B8%E5%AF%8C%E7%88%B8%E7%88%B8/">穷爸爸富爸爸 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%B2%BE%E8%BF%9B/">精进 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%BC%96%E7%A8%8B/">编程 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%99%9A%E5%B9%BB/">虚幻 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B9%8B%E8%B7%AF/">财务自由之路 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%91%E6%AD%A5/">跑步 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82/">路由传参 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%AF%E7%BA%BF/">路线 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%BD%AF%E4%BB%B6%E5%AE%9E%E6%96%BD/">软件实施 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%98%B3%E6%98%8E%E5%BF%83%E5%AD%A6/">阳明心学 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%A1%B9%E7%9B%AE/">项目 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%AD%85%E5%8A%9B/">魅力 (1)</a></li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title"><a href='/tags/'>标签</a></h3>
<div class="tagcloud">
    
    <a href="https://luckly.work/tags/flutter/">flutter</a>
    
    <a href="https://luckly.work/tags/IT/">IT</a>
    
    <a href="https://luckly.work/tags/Kotlin/">Kotlin</a>
    
    <a href="https://luckly.work/tags/Mysql/">Mysql</a>
    
    <a href="https://luckly.work/tags/nginx/">nginx</a>
    
    <a href="https://luckly.work/tags/Vue/">Vue</a>
    
    <a href="https://luckly.work/tags/YouTube%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD/">YouTube视频下载</a>
    
    <a href="https://luckly.work/tags/android/">android</a>
    
    <a href="https://luckly.work/tags/dart/">dart</a>
    
    <a href="https://luckly.work/tags/flutter/">flutter</a>
    
    <a href="https://luckly.work/tags/gin/">gin</a>
    
    <a href="https://luckly.work/tags/git/">git</a>
    
    <a href="https://luckly.work/tags/go/">go</a>
    
    <a href="https://luckly.work/tags/gorm/">gorm</a>
    
    <a href="https://luckly.work/tags/grpc/">grpc</a>
    
    <a href="https://luckly.work/tags/html/">html</a>
    
    <a href="https://luckly.work/tags/ios/">ios</a>
    
    <a href="https://luckly.work/tags/linux/">linux</a>
    
    <a href="https://luckly.work/tags/nginx/">nginx</a>
    
    <a href="https://luckly.work/tags/python/">python</a>
    
    <a href="https://luckly.work/tags/redis/">redis</a>
    
    <a href="https://luckly.work/tags/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99/">个人资料</a>
    
    <a href="https://luckly.work/tags/%E4%B9%A6%E5%8D%95/">书单</a>
    
    <a href="https://luckly.work/tags/%E4%B9%A6%E8%AF%84/">书评</a>
    
    <a href="https://luckly.work/tags/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统管理师</a>
    
    <a href="https://luckly.work/tags/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统项目管理师</a>
    
    <a href="https://luckly.work/tags/%E5%85%A5%E9%97%A8/">入门</a>
    
    <a href="https://luckly.work/tags/%E5%8E%9F%E5%88%99/">原则</a>
    
    <a href="https://luckly.work/tags/%E5%8E%9F%E7%94%9F%E9%80%9A%E8%AE%AF/">原生通讯</a>
    
    <a href="https://luckly.work/tags/%E5%9F%BA%E7%A1%80/">基础</a>
    
    <a href="https://luckly.work/tags/%E5%A4%8D%E5%88%A9%E6%95%88%E5%BA%94/">复利效应</a>
    
    <a href="https://luckly.work/tags/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程</a>
    
    <a href="https://luckly.work/tags/%E5%B0%91%E6%9C%89%E4%BA%BA%E8%B5%B0%E7%9A%84%E8%B7%AF/">少有人走的路</a>
    
    <a href="https://luckly.work/tags/%E5%BF%83%E8%AF%AD/">心语</a>
    
    <a href="https://luckly.work/tags/%E6%8F%92%E4%BB%B6/">插件</a>
    
    <a href="https://luckly.work/tags/%E6%95%99%E5%AD%A6/">教学</a>
    
    <a href="https://luckly.work/tags/%E7%8E%8B%E9%98%B3%E6%98%8E/">王阳明</a>
    
    <a href="https://luckly.work/tags/%E7%94%B5%E5%AD%90%E4%B9%A6/">电子书</a>
    
    <a href="https://luckly.work/tags/%E7%99%BB%E9%99%86%E8%A1%A8%E5%8D%95/">登陆表单</a>
    
    <a href="https://luckly.work/tags/%E7%A8%BB%E7%9B%9B%E5%92%8C%E5%A4%AB/">稻盛和夫</a>
    
    <a href="https://luckly.work/tags/%E7%A9%B7%E7%88%B8%E7%88%B8%E5%AF%8C%E7%88%B8%E7%88%B8/">穷爸爸富爸爸</a>
    
    <a href="https://luckly.work/tags/%E7%B2%BE%E8%BF%9B/">精进</a>
    
    <a href="https://luckly.work/tags/%E7%BC%96%E7%A8%8B/">编程</a>
    
    <a href="https://luckly.work/tags/%E8%99%9A%E5%B9%BB/">虚幻</a>
    
    <a href="https://luckly.work/tags/%E8%AF%97/">诗</a>
    
    <a href="https://luckly.work/tags/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">读书笔记</a>
    
    <a href="https://luckly.work/tags/%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B9%8B%E8%B7%AF/">财务自由之路</a>
    
    <a href="https://luckly.work/tags/%E8%B7%91%E6%AD%A5/">跑步</a>
    
    <a href="https://luckly.work/tags/%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82/">路由传参</a>
    
    <a href="https://luckly.work/tags/%E8%B7%AF%E7%BA%BF/">路线</a>
    
    <a href="https://luckly.work/tags/%E8%BD%AF%E4%BB%B6%E5%AE%9E%E6%96%BD/">软件实施</a>
    
    <a href="https://luckly.work/tags/%E9%80%9A%E8%AE%AF%E5%BD%95/">通讯录</a>
    
    <a href="https://luckly.work/tags/%E9%98%B3%E6%98%8E%E5%BF%83%E5%AD%A6/">阳明心学</a>
    
    <a href="https://luckly.work/tags/%E9%A1%B9%E7%9B%AE/">项目</a>
    
    <a href="https://luckly.work/tags/%E9%AD%85%E5%8A%9B/">魅力</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="http://www.topgoer.com/" title="枯藤">枯藤</a>
        </li>
        
        <li>
            <a target="_blank" href="https://gorm.cn/zh_CN/docs/index.html" title="gorm">gorm</a>
        </li>
        
        <li>
            <a target="_blank" href="https://docs.python.org/zh-cn/3/tutorial/index.html" title="python">python</a>
        </li>
        
        <li>
            <a target="_blank" href="https://www.liwenzhou.com/" title="李文周">李文周的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="http://www.xbzweb.com/" title="小包子的博客">小包子的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="https://www.flysnow.org/" title="飞雪无情的博客">飞雪无情的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="https://sliverhorn.com/" title="sliverhorn的博客">sliverhorn的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="http://yuedu.baidu.com/ebook/14a722970740be1e640e9a3e" title="Android Gradle权威指南">Android Gradle权威指南</a>
        </li>
        
        <li>
            <a target="_blank" href="https://gesdh.cn/" title="小格子">格子导航</a>
        </li>
        
        <li>
            <a target="_blank" href="https://itachi.xyz/" title="阿林">itachi&#39;s Blog</a>
        </li>
        
        <li>
            <a target="_blank" href="https://darjun.github.io/" title="大俊">大俊Blog</a>
        </li>
        
        <li>
            <a target="_blank" href="https://geektutu.com/post/quick-golang.html" title="极客兔兔">极客兔兔Blog</a>
        </li>
        
        <li>
            <a target="_blank" href="http://zxfcumtcs.github.io/" title="赵雪峰">雪峰Blog</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="https://luckly.work/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
            </div>
        </div>
    </div>
</body>

</html>